package com.example.demo4_sport.controller;



import com.example.demo4_sport.entity.User;
import com.example.demo4_sport.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class LoginController {


    @Autowired
    private IUserService userService;

    @PostMapping("/login")
    public String login(@RequestBody  User user){
        return userService.getUserByMessage(user);
    }
}
